function sendMessage1(name) {
  return new Promise((resolve, reject) => {
    console.log(
      `邓哥 -> ${name}: 最近由谣言说我喜欢你，我要澄清一下，那不是谣言`
    );
    console.log(`等待${name}回复......`);

    setTimeout(() => {
      if (Math.random() <= 0.1) {
        resolve(`${name} -> 邓哥：我是九，你是三，除了你还是你`);
      } else {
        reject(`${name} -> 邓哥：你是个好人`);
      }
    }, 100);
  });
}

const girlName = ["张三", "李四", "王五", "赵六"];
(async () => {
  let isSucess = false;
  for (const name of girlName) {
    try {
      const reply = await sendMessage1(name);
      console.log(reply);
      console.log("成功");
      isSucess = true;
      break;
    } catch (reply) {
      console.log(reply);
      console.log("表白失败");
    }
  }

  if (!isSucess) {
    console.log("全部失败");
  }
})();
